package com.cskaoyan.controller.admincontroller;

import com.cskaoyan.bean.common.BasePageInfo;
import com.cskaoyan.bean.common.BaseRespVo;
import com.cskaoyan.bean.chaosbean.log.vo.LogVO;
import com.cskaoyan.service.adminservice.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author jackX
 * @datetime 2022/12/29 14:54
 * @description: TODO:
 */
@RestController
@RequestMapping("admin/log")
public class LogController {

    @Autowired
    LogService logService;

    /**
     * 日志的分页信息查询
     * @param info 分页所需数据
     * @param name 管理员姓名 根据传进来的管理员name进行查询检索
     * @return
     */
    @RequestMapping("list")
    public BaseRespVo list(BasePageInfo info, String name) {
        LogVO log = logService.listLog(info, name);
        return BaseRespVo.okYa(log);
    }

}
